/*
 * @Author: cgl
 * @Date: 2023-04-19 14:57:57
 * @LastEditors: cgl
 * @LastEditTime: 2023-05-16 13:59:42
 * @FilePath: \public-health-emergencies-fed:\radiation-hygiene-fe\src\api\slides\detectionTogether.js
 * @Description:
 *
 * Copyright (c) 2023 by cgl/微盛信息产业有限公司, All Rights Reserved.
 */
import request from '@/utils/request'

// 修改检测总任务
export function detectionTogetherEdit(data) {
  return request({
    url: `/task/detectionTogether/edit`,
    method: "post",
    data,
  });
}
// 指派
export function getAssignorList(data) {
  return request({
    url: `/task/detectionTogether/getAssignorList`,
    method: "post",
    data,
  });
}

// 指派
export function detectionTogetherAssign(data) {
  return request({
    url: `/task/detectionTogether/assign`,
    method: "post",
    data,
    headers: {
			isLoading: true,
		}
  });
}
// 合同派发
export function detectionTogetherAssign2(data) {
  return request({
    url: `/task/detectionTogether/agreementAddByTester`,
    method: "post",
    data,
  });
}
// 合同列表-检测项目下钻列表
export function queryDetectionProjectList(params) {
  return request({
    url: '/task/detectionTogether/queryDetectionProjectList',
    method: 'get',
    params,
  })
}
// 新增检测总任务
export function detectionTogetherAdd(data) {
  return request({
    url: `/task/detectionTogether/add`,
    method: "post",
    data,
    headers: {
			isLoading: true,
		}
  });
}
// 检测总任务列表
export function detectionTogetherList(params) {
  return request({
    url: '/task/detectionTogether/list',
    method: 'get',
    params,
  })
}
// 检测总任务详情
export function detectionTogetherDetail(taskDetectionTogetherId) {
  return request({
    url: '/task/detectionTogether/getInfo/' + taskDetectionTogetherId,
    method: 'get',
    // headers: {
		// 	isLoading: true,
		// }
  })
}

// 获取检测总任务计划内容
export function getDetectionTaskPlanById({ taskDetectionTogetherId }) {
  return request({
    url: '/task/taskPlan/getByDetectionTogetherId',
    method: 'get',
    params: { taskDetectionTogetherId }
  })
}
// 新增检测总任务计划内容
export function addDetectionTaskPlan(data) {
  return request({
    url: '/task/taskPlan/add',
    method: 'post',
    data: data
  })
}
// 修改检测总任务计划内容
export function editDetectionTaskPlan(data) {
  return request({
    url: '/task/taskPlan/edit',
    method: 'post',
    data: data
  })
}
// 生成检测总任务计划内容书
export function generateDetectionTaskPlanDocument(taskDetectionTogetherId) {
  return request({
    url: `/task/detectionTogether/generatePlanDocument/${taskDetectionTogetherId}`,
    method: 'get'
  })
}
